package com.lnu_devteam.zongce.service;

import com.lnu_devteam.zongce.common.TokenResponse;
import com.lnu_devteam.zongce.model.dto.UserChangePwdDTO;
import com.lnu_devteam.zongce.model.dto.UserDTO;
import com.lnu_devteam.zongce.model.dto.UserLoginDTO;
import com.lnu_devteam.zongce.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lnu_devteam.zongce.model.vo.UserVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
* @author xbaoziplus
* @description 针对表【tb_user(用户表)】的数据库操作Service
* @createDate 2023-03-23 11:48:19
*/
public interface UserService extends IService<User> {

    TokenResponse<UserVO> login(UserLoginDTO userLoginDTO, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    User getLoginUser();

    String getLoginUserAccount();

    Long addUser(UserDTO userDTO);

    boolean changePwd(UserChangePwdDTO userChangePwdDTO, HttpServletRequest request);

    boolean isAdmin(User user);

    boolean resetPwd(Long targetId, HttpServletRequest request);

    boolean upload(MultipartFile file);

    void removeLoginStatus();

    void refreshAuth();
}
